-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(readme): added deepwiki to readme, consolidated utils #2856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR consolidates workflow utility functions and standardizes modal UI patterns across the application. Key Changes:
The refactoring improves code maintainability by eliminating duplicate logic and provides a single source of truth for start block type validation. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant UI as UI Components
participant Utils as start-block-types.ts
participant TriggerUtils as trigger-utils.ts
participant API as API Routes
Note over Utils: New centralized module<br/>exports VALID_START_BLOCK_TYPES,<br/>ValidStartBlockType, isValidStartBlockType()
User->>UI: Interacts with workflow
UI->>Utils: isValidStartBlockType(blockType)
Utils-->>UI: boolean (type guard)
User->>UI: Opens modal (delete/leave/edit)
Note over UI: Standardized modal patterns:<br/>- variant='default' for cancel<br/>- variant='destructive' for dangerous actions<br/>- Consistent text sizing (12px)
UI-->>User: Shows confirmation modal
User->>API: Submits form/workflow
API->>Utils: isValidStartBlockType(block.type)
Utils-->>API: Validates start block
API->>TriggerUtils: getTrigger() / generateMockPayload()
TriggerUtils->>Utils: isValidStartBlockType()
Utils-->>TriggerUtils: Validation result
TriggerUtils-->>API: Mock payload
API-->>User: Response
Note over UI,API: All hardcoded checks replaced<br/>with centralized utility:<br/>- input-format.ts<br/>- workflow-tool-schema.ts<br/>- get-block-upstream-references.ts<br/>- use-accessible-reference-prefixes.ts
|
c71011c to
c115ced
Compare
Collaborator
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
N/A
Checklist